package portal.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import portal.beans.Gpu;
import portal.mybatis.dao.service.GpuService;
import portal.mybatis.page.Page;

@RestController
public class GpuController extends BaseController{
	@Autowired
	GpuService gpuService;
	@RequestMapping(value="/gpu/page",method=RequestMethod.GET)
	public Page<Gpu> getPage(long pageSize,long offset,String searchText,String sort,String sortOrder){
		if(pageSize<0)
			pageSize=10;
		if(offset<0)
			offset=0;
		Page<Gpu> p=gpuService.getPage(new Page<Gpu>(pageSize,offset,searchText,sort ,sortOrder));
		return p;
	}
}
